<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img src="//img1.qunarzz.com/sight/p0/1603/4e/4e7a704010c95d2490.water.jpg_600x330_f925017c.jpg" alt="">
      <div class="banner-info">
        <div class="banner-title">海棠湾</div>
        <div class="banner-number">18</div>
      </div>
    </div>
    <common-gallary :imgs="imgs" @close="handleClickClose" v-show="showGallray"></common-gallary>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/gallary'
export default {
  name: 'DetailBanner',
  data () {
    return {
      showGallray: false,
      imgs: ['http://img1.qunarzz.com/sight/p0/1603/4e/4e7a704010c95d2490.water.jpg_r_800x800_b72e84dc.jpg', 'http://img1.qunarzz.com/sight/p0/201306/26/04ce17682ab714e2c8d65eac.jpg_r_800x800_3969954b.jpg']
    }
  },
  components: {
    CommonGallary
  },
  methods: {
    handleBannerClick () {
      this.showGallray = true
    },
    handleClickClose () {
      this.showGallray = false
    }
  }
}
</script>

<style lang="stylus" scoped>
.banner
  position: relative
  height: 0
  padding-bottom 55%
  color: #fff
  img
    max-width: 100%
  .banner-info
    height: 46px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,.8))
    .banner-title
      position: absolute
      bottom: 0
      right: 0
      left: 0
      padding: 5px 10px
    .banner-number
      position: absolute
      bottom: 5px
      right: 5px
      padding: 0px 10px
      background: rgba(0,0,0,0.8)
      border-radius: 15px
</style>
